import Vue from 'vue'
import App from './App.vue'
import router from './route'
import 'lib-flexible/flexible.js'
import config from './service/config';
import * as api from "./service/request"; // 请求方式
//import './assets/reset.css';

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);
Vue.config.productionTip = false;
Vue.prototype.$api = api;
Vue.prototype.$config = config; // 将api挂载到vue的原型上

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')